<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <form name="f1">
      <p>name <input type="text" name="uname" /></p>
      <p>email <input type="text" name="email" /></p>
      <p>phone <input type="text" name="phone" /></p>
    </form>
    <script>
      // document.form-name.element-name
      console.log(document.f1);
      console.log(document.f1.email);
      console.log(document.f1.uname);
      console.log(document.f1.phone);

      // console.log(document.querySelector('[name="uname"]'));

      // console.log(document.f1.uname.form);
    </script>
  </body>
</html>
